<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/common/header.jsp"%>
<html>
<head>
  <script type="text/javascript">
  function doSearch() {
	  grid.load({
            adv_place: $('#adv_place').val(),
            app_name_app: $('#app_name_app').val(),
            ins_cd: $('#ins_cd').val(),
            ins_cn_nm  :$('#ins_cn_nm').val()
		});
  }
  /*新增*/
  function addHeadAdv(url){
	  commonDetail(url, "save", "headAdvTableId");
  }
 /* 修改*/
  function modifyHeadAdv(url){
	  commonDetail(url, "update", "headAdvTableId");
  }
  /*删除*/
  function deleteHeadAdv(url){
      commonDel(url, "delete", "headAdvTableId");
  }
  var grid;
  $(document).ready(function() {
	  grid = $("#headAdvTableId").jpgrid({
			url: "getHeadAdvListJson.do",
			columns: [
                {title: "APP名称", field: "APP_NAME_APP",width:100},
                {title: "所属机构", field: "INS_CN_NM",width:180},
				{title: "广告位位置", field: "ADVPLACE",width:100},
                {title: "广告标题", field: "ADV_TITLE",width:100},
                {title: "广告编号", field: "ADV_NO",width:100}
			]
		});
  });
  </script>
</head>
<body class="easyui-layout list_body"  >
	<form id="headAdvForm" name="headAdvForm">
		<div class="list_body_north" data-options="region:'north'"  border="false" >
			<!-- 查询表单 -->
			<div  class="datagrid-toolbar" border="false"  >
				<span>app名称:</span>
				<input id="app_name_app" type="text" name="app_name_app"  class="easyui-textbox"  >
				<span>广告位位置:</span>
				<code:codeSelect id="adv_place" name="adv_place" showSelect="true" code_type="ADV_PLACE" selectId="${infEntity.adv_place}"></code:codeSelect>
				<span>机构号:</span>
				<input id="ins_cd" type="text" name="ins_cd"  class="easyui-textbox"  >
				<span>机构名称:</span>
				<input id="ins_cn_nm" type="text" name="ins_cn_nm"  class="easyui-textbox"  >
				<a href="#" class="easyui-linkbutton btn" iconCls="icon-search" onclick="doSearch() ">查询</a> 
				<a href="#" class="easyui-linkbutton btn" iconCls="icon-reload" onclick="resetForm() ">重置</a>					
			</div>
			<!-- 自定义标签工具栏 -->
			<jiepos:buttonOperateTag menuCode="${menuCode}"></jiepos:buttonOperateTag>	
		</div>
		<div data-options="region:'center'" border="false"  class="list_body_center">		
			<!-- 表格 -->
			<table id="headAdvTableId" fit="true"></table>
		</div>
	</form>
</body>
</html>
